<?php
header("Content-Type:text/html;charset=UTF-8");
require_once '../global.php';
function king_def(){
	global $king;

		
		$bot=$_GET[bot];
		$rq=$_GET[rq];
		if(empty($bot)){
			$bot='Baidu';
		}

		$array=log_class::king_rot($bot);

		if(!empty($array)){
			foreach($array as $v){ 
				$ks.="{
					";
				$ks.="country:\"".$v['ktitle'].'",
				';
				$ks.="visits:\"".log_class::rotsql_count('ip',$bot,$v['ktitle'],'',$rq).'",
				';
				$ks.="color:\"".log_class::randomColor()."\"";
				$ks.="
				},
				";		
			}
		
		

		$tmp=new KC_Template_class('log/temple.htm','');
		$tmp->assign('main',$ks);
		$tmp->assign('title',$bot);

		echo $tmp->output();
	}
}








?>

